import request from '@/utils/request'

// 查询漫画章节列表
export function listCaricatureChapter(query) {
  return request({
    url: '/pixiv/caricatureChapter/list',
    method: 'get',
    params: query
  })
}

// 查询漫画章节详细
export function getCaricatureChapter(id) {
  return request({
    url: '/pixiv/caricatureChapter/' + id,
    method: 'get'
  })
}

// 新增漫画章节
export function addCaricatureChapter(data) {
  return request({
    url: '/pixiv/caricatureChapter',
    method: 'post',
    data: data
  })
}

// 修改漫画章节
export function updateCaricatureChapter(data) {
  return request({
    url: '/pixiv/caricatureChapter',
    method: 'put',
    data: data
  })
}

// 删除漫画章节
export function delCaricatureChapter(id) {
  return request({
    url: '/pixiv/caricatureChapter/' + id,
    method: 'delete'
  })
}

export function getBatchChapter(caricatureId) {
  return request({
    url: '/pixiv/caricatureChapter/batchChapter/' + caricatureId,
    method: 'get'
  })
}

export function updateBatchChapter(data) {
  return request({
    url: '/pixiv/caricatureChapter/updateBatchChapter',
    method: 'put',
    params: data
  })
}